<template>
  <van-nav-bar v-if="route.meta.navBar" :title="route.meta.title" left-text="返回" left-arrow @click-left="onClickLeft" />
</template>

<script lang="ts">
  import { defineComponent } from 'vue'
  import { useRoute, useRouter } from 'vue-router'

  export default defineComponent({
    setup() {
      const route = useRoute()
      const router = useRouter()
      const onClickLeft = () => router.go(-1)
      return {
        route,
        router,
        onClickLeft
      }
    }
  })
</script>

<style></style>
